@extends('admin.main')

@section('body')
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>服务套餐列表</h2>
    </div>
    <div class="cf">
        <div class="fl">
            <a class="btn" href="{{urlAdmin('service','getAdd')}}" >新 增</a>
        </div>
    </div>
    <!-- 数据列表 -->
    <div class="data-table table-striped">
        <table class="">
            <thead>
            <tr>
                <th class="row-selected row-selected"><input class="check-all" type="checkbox"/></th>
                <th class="">服务套餐名称</th>
                <th class="">所属权限组</th>
                <th class="">服务时间 (年)</th>
                {{--<th class="">基础服务费 (元)</th>--}}
                <th class="">开店资费 (元)</th>
                <th class="">操作</th>
            </tr>
            </thead>
            <tbody>
            @if(count($rows))
                @foreach($rows as $v)
                    <tr>
                        <td><input class="ids" type="checkbox" name="ids[]" value="{{$v['id']}}"/></td>
                        <td>{{$v['name']}}</td>
                        <td>
                            @foreach($groups as $m)
                                @if($v['group_id'] == $m['id'])
                                    {{$m['title']}}
                                @endif
                            @endforeach
                        </td>
                        <td>{{$v['time']}}</td>
                        {{--<td>{{$v['base_price']}}</td>--}}
                        <td>{{$v['shop_price']}}</td>
                        <td>
                            <a title="编辑"
                               href="{{urlAdmin('service','getEdit',['id'=>$v['id']])}}">编辑</a>
                        </td>
                    </tr>
                @endforeach
            @else
                <td colspan="12" class="text-center"> aOh! 暂时还没有内容!</td>
            @endif
            </tbody>
        </table>
    </div>
@endsection

